package com.springioc;

import com.springioc.direct.Director;
import com.springioc.ioc.MoAttack;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class Application {

    public static void main(String[] args) {

        ApplicationContext ctx= SpringApplication.run(Application.class, args);
        //从容器中获取对象
        MoAttack moAttack=(MoAttack) ctx.getBean(MoAttack.class);
        moAttack.cityGateAsk();
    }

}
